<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>练习</title>
    <link rel="stylesheet" href="../css/common.css">
</head>

<body>
    <div id="box">
    </div>
</body>

<!-- <script src="../js/common.js"></script> -->

<script>
    /**
 * 删除 link 文件
 * @param href
 */
    function removeCss (href) {
        var links = document.getElementsByTagName("link");
        console.log('links', links)
        for (var i = 0; i < links.length; i++) {
            var _href = links[i].href;
            console.log('_href', _href);
            if (links[i] && links[i].href && links[i].href.indexOf(href) != -1) {
                links[i].parentNode.removeChild(links[i]);
            }
        }
    }

    removeCss('common.css')


</script>

</html>